import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '仓库代码',
    align:"center",
    dataIndex: 'wareCode'
   },
   {
    title: '仓库名称',
    align:"center",
    dataIndex: 'wareName'
   },
   {
    title: '库区编码',
    align:"center",
    dataIndex: 'areaCode'
   },
   {
    title: '库区名称',
    align:"center",
    dataIndex: 'areaName'
   },
   
   {
    title: '库位编码',
    align:"center",
    dataIndex: 'kwCode'
   },
   {
    title: '库位名称',
    align:"center",
    dataIndex: 'kwName'
   },
   {
    title: '库位类型编码',
    align:"center",
    dataIndex: 'kwTypeCode'
   },
  //  {
  //   title: '简称',
  //   align:"center",
  //   dataIndex: 'shortName'
  //  },
   {
    title: '容纳描述',
    align:"center",
    dataIndex: 'kwDesc'
   },
   {
    title: '库位所在层数',
    align:"center",
    dataIndex: 'kwLevel'
   },
   {
    title: '货架编码',
    align:"center",
    dataIndex: 'shelfCode'
   },
   {
    title: '货架名称',
    align:"center",
    dataIndex: 'shelfName'
   },
   {
    title: '库位所在列数',
    align:"center",
    dataIndex: 'kwColumn'
   },
   
   {
    title: '库位状态',
    align:"center",
    dataIndex: 'kwStatus'
   },
   {
    title: '长度',
    align:"center",
    dataIndex: 'length'
   },
   {
    title: '宽度',
    align:"center",
    dataIndex: 'width'
   },
   {
    title: '高度',
    align:"center",
    dataIndex: 'heigh'
   },
   {
    title: '尺寸单位',
    align:"center",
    dataIndex: 'measureMent'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '最大库存量',
    align:"center",
    dataIndex: 'maxStock'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "库位编码",
      field: 'kwCode',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "库位名称",
      field: 'kwName',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '仓库代码',
    field: 'wareCode',
    component: 'Input',
  },
  {
    label: '仓库名称',
    field: 'wareName',
    component: 'Input',
  },
  {
    label: '库区描述',
    field: 'areaName',
    component: 'Input',
  },
  {
    label: '库区名称',
    field: 'areaCode',
    component: 'Input',
  },
  {
    label: '库位编码',
    field: 'kwCode',
    component: 'Input',
  },
  {
    label: '库位名称',
    field: 'kwName',
    component: 'Input',
  },
  // {
  //   label: '库位类型编码',
  //   field: 'kwTypeCode',
  //   component: 'Input',
  // },
  {
    label: '简称',
    field: 'shortName',
    component: 'Input',
  },
  {
    label: '容纳描述',
    field: 'kwDesc',
    component: 'InputTextArea',
  },
  {
    label: '库位所在层数',
    field: 'kwLevel',
    component: 'InputNumber',
  },
  {
    label: '货架编码',
    field: 'shelfCode',
    component: 'Input',
  },
  {
    label: '货架名称',
    field: 'shelfName',
    component: 'Input',
  },
  {
    label: '库位所在列数',
    field: 'kwColumn',
    component: 'InputNumber',
  },
  
  {
    label: '库位状态',
    field: 'kwStatus',
    component: 'Input',
  },
  {
    label: '长度',
    field: 'length',
    component: 'InputNumber',
  },
  {
    label: '宽度',
    field: 'width',
    component: 'InputNumber',
  },
  {
    label: '高度',
    field: 'heigh',
    component: 'InputNumber',
  },
  {
    label: '尺寸单位',
    field: 'measureMent',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '最大库存量',
    field: 'maxStock',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}